package com.jfinal.demo.model;

import com.jfinal.plugin.activerecord.Model;

import java.util.List;

/**
 * Title:User
 * Description: 用户
 *
 * @version 2.0
 * @author: Yung Fu(FUYUNGCN AT GMAIL DOT com)
 * @since: 14-9-21 下午2:04
 */
public class User extends Model<User> {

    public static final User dao = new User();

    /**
     * 一对多
     *
     * @return List<Blog>
     */
    private List<Blog> getBlogs() {
        return Blog.dao.find("select * from blog where user_id = ?", get("id"));
    }
}
